package main

import (
	"fmt"
	"server/csvs"
	"server/game"
	"time"
)

func main()  {
	fmt.Println("...... hello genshin ......")
	csvs.CheckLoadCsv()


	go game.GetManageBanWord().Run()
	player := game.NewTestPlayer()
	player.SetBirth(111)
	player.SetBirth(831)

	var roles = []int {1, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10}
	player.SetShowTeam(roles)


	tickerIn := time.NewTicker(time.Second * 1)
	for  {
		select {
		case <-tickerIn.C:
			if time.Now().Unix() % 3 == 0 {
				player.ReduceWorldLevel()
			}else if time.Now().Unix() % 5 == 0 {
				player.ReturnWorldLevel()
			}
		}
	}
}
